package javase;

import java.util.concurrent.Callable;

public class D {
    static class A implements Runnable {
        @Override
        public void run() {
            System.out.println("创建线程的方式一");
        }
    }

    static class B extends Thread {
        @Override
        public void run() {
            System.out.println("创建线程的方式二");
        }
    }

    static class C implements Callable<Integer> {
        @Override
        public Integer call() {
            System.out.println("创建线程的方式二");
            return 0;
        }
    }

    public static void main(String[] args) {
        A a = new A();
        Thread thread = new Thread(a);
        thread.start();

        B b = new B();
        b.start();

        C c = new C();

    }
}
